from __future__ import with_statement
import api.urls
import feeds.urls
from google.appengine.api import users
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
import logging
import os
import string


SERVER_SOFTWARE = os.environ.get("SERVER_SOFTWARE")
if SERVER_SOFTWARE is None or SERVER_SOFTWARE.startswith("Dev"):
    DEBUG = True
else:
    DEBUG = False


patterns = []
for pattern in (api.urls.patterns, feeds.urls.patterns):
    patterns.extend(pattern)
application = webapp.WSGIApplication(patterns, debug=DEBUG)

def main():
    run_wsgi_app(application)


if __name__ == '__main__':
    main()
